<div class="portlet box green">
	<div class="portlet-title">
		<div class="caption">
			<i class="fa fa-cogs"></i>
			订单 &gt; 订单管理 &gt; 新增
		</div>
		<div class="tools">
			<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
		</div>
	</div>
	<div class="portlet-body">
		<div class="portlet-body form">
			<form action="/order/selectSku" class="form-horizontal" method="get" id="searchForm" onsubmit="return false">
				<div class="form-body">
					<div class="row">
						<div class="col-md-4">
							<label class="col-md-4 control-label">货品：</label>
							<div class="col-md-8">
								<input type="text" class="form-control" name="name" value="$!name">
								<input type="hidden" name="cid" value="$!cid" id="categoryId" />
								<input type="hidden" name="pageNo" value="$skuPage.pageNo" id="divPageNo"/>
							</div>
						</div>
						<div class="col-md-8">
							<div class="col-md-10"></div>
							<div class="actions col-md-1">
								<a href="javascript:;" class="btn green btn-sm ajax-search-asdiv">
									<i class="fa fa-search"></i>
									搜索
								</a>
							</div>
							<div class="actions col-md-1">
								<a href="javascript:;" class="btn white btn-sm search-reset " onclick="$('#categoryId').val('');">
									<i class="fa fa-eraser"></i>
									清除
								</a>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
		<div class="dataTables_wrapper no-footer">
			<div>
				<table class="table table-striped table-bordered table-hover" style="table-layout: fixed">
					<thead>
						<tr>
							<th>货品编码</th>
							<th class="col-md-2">货品名称</th>
							<th>规格</th>
							<th>单价</th>
							<th>起订量</th>
							<th class="col-md-2">基本数量</th>
							<th class="col-md-2">交易数量</th>
							<th>金额</th>
							<th>优惠</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						#foreach($item in $skuPage.result) 
						#set($product=$!item.product)
						#set($_thisPrice =$!product.startNum*$!item.skuPrice )
						<tr>
							<td>$!item.code</td>
							<td class="ellipsis_td">$!product.name</td>
							<td>$!item.attrValueNames</td>
							<td class="skuPrice">$!item.skuPrice</td>
							<td>$!product.startNum</td>
							<td noWrap>
								<input type="text" name="quantity" class="input-xsmall_80 positiveIntegerNum2 willQuantity" value="$!product.startNum" min="$!product.startNum" />
								<div class="input-xsmall_80_right">$!product.unit.name</div>
							</td>
							<td noWrap>
								#set($translateRate = 1) 
								#if($item.translateRate) 
								#set($translateRate = $item.translateRate) 
								#end
								#set($startUxNum=$!product.startNum/$translateRate) #if($!product.startNum%$translateRate >0)
								#set($startUxNum=$startUxNum+1) #end
								<input type="text" name="axQuantity" class="input-xsmall_80 positiveIntegerNum2 willAxQuantity"
									transRate="$translateRate" min="$startUxNum" value="$startUxNum"/>
								<div class="input-xsmall_80_right">$!item.auxUnit.name</div>
							</td>
							<td class="trAmount">$_thisPrice</td>
							<td>0.00</td>
							<td>
								<a class="btn green btn-outline btn-sm add-session-sku" thref="/order/addSkuCart?skuId=$!item.id" href="javascript:">
									<i class="fa fa-plus"></i>
									添加
								</a>
							</td>
						</tr>
						#end
					</tbody>
				</table>
			</div>
			#set($page=$skuPage)
			#set($divId='skuSelectMainDiv') 
			#set($pageUrl="/order/selectSku?cid=$!cid&pageNo=") 
			#parse("_pageDiv.htm")
		</div>
	</div>
</div>
<script src="/assets/scripts/views-orderadd.js" type="text/javascript"></script>
<script type="text/javascript" > 

 function goDivPage(url) {
	$('#skuSelectMainDiv').load(url);
	
} 

</script>
